#include <stdio.h>
#include <math.h>
#pragma warning (disable:4996)
int  fun( int  n ,int  *value )
{  int  d,s,i;
/**************found**************/
   d=1;  s=0;
   for(i=1; i<=5; i++)  d=d*n;
   *value=d;
   for(i=1; i<=3; i++)
   {  s=s+d%10;
/**************found**************/
      d=d/10;
   }
   return  s;
}
main()
{  int  n, sum, v;
   do
   {  printf("\nEnter n( 2<n<8):  ");scanf("%d",&n);  }
   while(n<=2||n>=8);
   sum=fun( n,&v );
   printf("\n\nThe result:\n  value=%d  sum=%d\n\n",v,sum);
}
